package com.md.api.common.utils;

import org.springframework.context.ApplicationContext;

public class ApplicationUtil {

	
	private static ApplicationContext context;
	
	public static void initContext(ApplicationContext temp) {
		context = temp;
	}
	
	public static <T> T getBean(Class<T> t) {
		return context.getBean(t);
	}
	
	public static  Object getBean(String name) {
		return context.getBean(name);
	}
}
